package com.ruoyi.com.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.OperateBasicForm;
import com.ruoyi.common.core.domain.entity.ComUser;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.system.domain.vo.ComUserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 公共用户Mapper接口
 *
 * @author sunye
 * @date 2024-09-26
 */
public interface ComUserMapper extends BaseMapper<ComUser>
{

    ComUser selectAppUserByUserName(String username);

    List<ComUser> selectAllocatedList(ComUser user);

    List<ComUser> selectUnallocatedList(ComUser user);

    void updateUserProfile(ComUser user);

    int updateByUserId(ComUser currentUser);

    public int resetUserPwd(@Param("userName") String userName, @Param("password") String password);

    List<ComUser> selectComUserList(ComUserVo comUser);

    ComUser selectComUserByUserId(Long userId);

    ComUser selectComUserByUserIdAndDeptId(@Param("userId") Long userId,@Param("deptId") Long deptId);


    List<Long> selectAllRoleIdsByUserId(@Param("userId") Long userId,@Param("deptId") Long deptId);


}
